package com.ita.os.merchant.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;

public class JmsUtil {

	private static ConnectionFactory factory;
	private static Destination queue;

	public static void init() {
		Properties props = new Properties();
		InputStream in = null;
		Connection con = null;
		in = JmsUtil.class.getClassLoader().getResourceAsStream("jms_config.properties");
		try {
			props.load(in);
			ConnectionFactory f = new ActiveMQConnectionFactory(props.getProperty("url"));
			con = f.createConnection();
			Destination q = new ActiveMQQueue(props.getProperty("queue"));
		} catch (IOException e) {
			e.printStackTrace();
		} catch (JMSException e) {
			e.printStackTrace();
		}


	}

	public static void main(String[] args) {

	}

}
